package com.itheima.client.fallback;

import com.itheima.client.OrderClient;
import com.itheima.cloud.response.OrderVO;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class OrderClientsFallBack implements OrderClient {
    @Override
    public List<OrderVO> findOrderByUsername(String username) {
        ArrayList<OrderVO> orders = new ArrayList<>();
        OrderVO orderVO = new OrderVO();
        orderVO.setNumber(-1);
        orderVO.setPname("通用返回异常");
        orders.add(orderVO);
        return orders;
    }
}
